<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>后台管理</title>
    {load href="__PUBLIC__/static/admin/css/common.css" /}
    {load href="__PUBLIC__/static/admin/css/main.css" /}
    {load href="__PUBLIC__/static/admin/js/libs/modernizr.min.js" /}
    {load href="__PUBLIC__/static/jquery/2.2.4/jquery.min.js" /}
    {load href="__PUBLIC__/static/js/dialog/layer.js" /}
    {load href="__PUBLIC__/static/js/dialog.js" /}
    {load href="__PUBLIC__/static/admin/js/list.js" /}
    {load href="__PUBLIC__/static/admin/js/checkAll.js" /}
</head>
<body>
<!--页面顶部导航模块-->
{include file="public/top" /}

<div class="container clearfix">
	<!--页面左侧导航模块-->
	{include file="public/left" /}

    <!--/sidebar-->
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="{:url('Index/index')}">后台</a><span class="crumb-step">&gt;</span><span class="crumb-name">文章管理</span></div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="query" method="post">
                    <table class="search-tab">
                        <tr>
                            <th width="120">文章分类:</th>
                            <td>
                                {$CATEGORY_MENU}
                            </td>
                            <th width="120">标题关键字:</th>
                            <td><input class="common-text-thin" placeholder="关键字" name="keywords" id="" type="text" value = {$KEYWORDS|default=''} ></td>
                            <td><input class="btn btn-primary btn2 btn-sm" id="queryBtn" name="sub" value="查询" type="submit"></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post" action="batch_delete">
                <div class="result-title">
                    <div class="result-list">
                        <a href="{:url('article/insert')}"><i class="icon-font"></i>新增文章</a>
                        <a id="batchDel" href="javascript:void(0)" onclick="document:myform.submit();"><i class="icon-font"></i>批量删除</a>
                        <!--<a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i>更新排序</a>-->
                    </div>
                </div>
                <div class="result-content">
                    

                      <table class="result-tab" id="article_list" width="100%">
                          <tr>
                              <th class="tc" width="5%"><input class="allChoose" name="" type="checkbox" onclick="checkAll(this, 'article_list', 'article_item');"></th>
                              <th width="5%">ID</th>
                              <th >标题</th>
                              <th width="10%">栏目</th>
                              <!--th width="6%">作者</th-->
                              <th width="6%">缩略图</th>
                              <th width="6%">状态</th>
                              <th width="6%">推荐</th>
                              <th width="13%">创建时间</th>
                              <!--<th width="13%">更新时间</th>-->
                              <th width="10%">操作</th>
                          </tr>
                          {volist name="ARTICLES" id="data"  empty="暂时没有数据"}
                          <tr>
                              <td class="tc"><input class="article_item" name="id[]" value="{$data.id}" type="checkbox"></td>
                              <td>{$data.id}</td>
                              <td title={$data.title}>{$data.title}</td>
                              <td title={$data.category}>{$data.category}</td>
                              <!--td title={$data.author}>{$data.author}</td-->
                              <td>
                              {if condition="$data.thumbnail neq ''"} <img src="__PUBLIC__{$data.thumbnail}" height="40">
                              {else /} 暂无
                              {/if}
                              </td>
                              <td title={$data.status}>
                                {switch name="$data.status"}
                                  {case value="0"}待审核{/case}
                                  {case value="1"}已发布{/case}
                                {/switch}
                              </td>
                              <td title={$data.isfeature}>
                                {switch name="$data.isfeature"}
                                  {case value="0"}否{/case}
                                  {case value="1"}是{/case}
                                {/switch}
                              </td>
                              <td title={$data.create_time}>{$data.create_time}</td>
                              <!--<td title={$data.update_time}>{$data.update_time}</td>-->
                              <td>
                                  <a class="link-update" href="{:url('edit',array('id'=>$data.id))}">修改</a> |
                                  <a class="link-del" id="link-del" attr-id="{$data.id}" attr-message="确定删除该文章?" href="javascript:void(0)" >删除</a>
                              </td>
                          </tr>
                          {/volist}
                      </table>
                      <div class="list-page">
                        {if condition="empty($ARTICLES) neq true"} {$ARTICLES->render()}
                        {/if}
                      </div>
                </div>
            </form>
        </div>
    </div>
    <!--/main-->
</div>
</body>
</html>